//
//  RelatedTableViewCell.m
//  Arts1
//
//  Created by Liujl on 15/9/18.
//  Copyright (c) 2015年 Arts1. All rights reserved.
//

#import "RelatedTableViewCell.h"

#import "AllHeader.h"


@interface RelatedTableViewCell ()

@property (nonatomic, strong) UICollectionView *collectionview;



@end



@implementation RelatedTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        UIView *whiteview = [[UIView alloc] initWithFrame:CGRectMake(10, 0, SCREEN_WIDTH - 20 ,9 * (SCREEN_WIDTH - 40)/ 32.0 + 10)];
        whiteview.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:whiteview];
        
        _mainImageview = [[UIImageView alloc] initWithFrame:CGRectMake(10, 5, (SCREEN_WIDTH - 40)/2.0, 9 * (SCREEN_WIDTH - 40) / 32.0)];
        _mainImageview.image = [UIImage imageNamed:@"8.jpeg"];
        [whiteview addSubview:_mainImageview];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(_mainImageview.right + 10, 10 , self.width - _mainImageview.width - 20, 20)];
        _titleLabel.font = [UIFont systemFontOfSize:11];
        _titleLabel.text = @"彩铅绘制";
        [whiteview addSubview:_titleLabel];
        
        _subtitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(_mainImageview.right + 10, _titleLabel.bottom + 5 , self.width - _mainImageview.width - 20, 20)];
        _subtitleLabel.font = [UIFont systemFontOfSize:11];
        _subtitleLabel.text = @"张喑";
        [whiteview addSubview: _subtitleLabel];
        
        _payLabel = [[UILabel alloc] initWithFrame:CGRectMake(_mainImageview.right + 10, _mainImageview.bottom - 30 , 100 , 20 )];
        _payLabel.font = [UIFont systemFontOfSize:11];
        _payLabel.text = @"68.0元";
        [whiteview addSubview: _payLabel];
        
        UIView *bgrayview = [[UIView alloc] initWithFrame:CGRectMake(10, _mainImageview.bottom + 4.5, whiteview.width - 10, 0.5)];
        bgrayview.backgroundColor = [UIColor grayColor];
        [whiteview addSubview:bgrayview];
    
    }
    return self;
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
